package vista;

import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javabean.JPanelImagen;

import javax.swing.WindowConstants;

/**
 * This code was edited or generated using CloudGarden's Jigloo SWT/Swing GUI
 * Builder, which is free for non-commercial use. If Jigloo is being used
 * commercially (ie, by a corporation, company or business for any purpose
 * whatever) then you should purchase a license for each developer using Jigloo.
 * Please visit www.cloudgarden.com for details. Use of Jigloo implies
 * acceptance of these licensing terms. A COMMERCIAL LICENSE HAS NOT BEEN
 * PURCHASED FOR THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED LEGALLY FOR
 * ANY CORPORATE OR COMMERCIAL PURPOSE.
 */
public class VMenu extends javax.swing.JFrame {
	private JPanelImagen jpangenerarp;
	private JButton btngenerarp;
	private JButton btnregistrare;
	private JButton btntabla;
	private JButton btncalendario;
	private JButton btnregistrara;
	private JButton btnsalirgp;
	private JLabel lblgenerarp;

	public VMenu() {
		super();
		initGUI();
	}

	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				jpangenerarp = new JPanelImagen();
				getContentPane().add(jpangenerarp, BorderLayout.CENTER);
				jpangenerarp.setRutaImagen("/imagenes/images2.jpeg");
				jpangenerarp.setLayout(null);
				{
					lblgenerarp = new JLabel();
					jpangenerarp.add(lblgenerarp);
					lblgenerarp.setText("Menu");
					lblgenerarp.setBounds(187, 6, 64, 15);
					lblgenerarp.setFont(new java.awt.Font("Comic Sans MS", 1,
							18));
				}
				{
					btngenerarp = new JButton();
					jpangenerarp.add(btngenerarp);
					btngenerarp.setText("Generar Partidos");
					btngenerarp.setBounds(112, 104, 203, 22);
					btngenerarp.setFont(new java.awt.Font("Comic Sans MS", 1,
							12));
				}
				{
					btnsalirgp = new JButton();
					jpangenerarp.add(btnsalirgp);
					btnsalirgp.setText("Salir");
					btnsalirgp.setBounds(340, 192, 70, 22);
					btnsalirgp
							.setFont(new java.awt.Font("Comic Sans MS", 1, 12));
				}
				{
					btnregistrara = new JButton();
					jpangenerarp.add(btnregistrara);
					btnregistrara.setText("Registrar Arbitro");
					btnregistrara.setBounds(112, 33, 203, 22);
					btnregistrara.setFont(new java.awt.Font("Comic Sans MS", 1,
							12));
				}
				{
					btnregistrare = new JButton();
					jpangenerarp.add(btnregistrare);
					btnregistrare.setText("Registrar Equipo");
					btnregistrare.setBounds(112, 66, 203, 22);
					btnregistrare.setFont(new java.awt.Font("Comic Sans MS", 1,
							12));
				}
				{
					btncalendario = new JButton();
					jpangenerarp.add(btncalendario);
					btncalendario.setText("Consultar Calendario");
					btncalendario.setBounds(112, 137, 203, 22);
					btncalendario.setFont(new java.awt.Font("Comic Sans MS", 1,
							12));
				}
				{
					btntabla = new JButton();
					jpangenerarp.add(btntabla);
					btntabla.setText("Consultar Tabla de Posiciones");
					btntabla.setBounds(112, 170, 203, 22);
					btntabla.setFont(new java.awt.Font("Comic Sans MS", 1, 12));
				}
			}
			pack();
			this.setSize(437, 265);
		} catch (Exception e) {
			// add your error handling code here
			e.printStackTrace();
		}
	}

	// este metodo se utiliza para controlar los eventos de cada boton
	public void addListener(ActionListener accion) {
		btnregistrara.addActionListener(accion);
		btnregistrare.addActionListener(accion);
		btngenerarp.addActionListener(accion);
		btnsalirgp.addActionListener(accion);
		btncalendario.addActionListener(accion);
		btntabla.addActionListener(accion);

	}

	// llamaremos a esta funcion para enviar mensaje en la pantalla de partido
	// cuando se amerite
	public void mostrarMensaje(String mensaje) {
		JOptionPane.showMessageDialog(this, mensaje);
	}

}
